<?php
/*
 * mall controller 2012.8.28 mall.php
 */

class mall extends CI_Controller {
	function __construct() {
		parent::__construct ();
		$this->load->helper ( 'url' );
		$this->load->library ('commonClass');
		session_start();
	}
	
	function index(){
		$uid = commonClass::Listion_user ();
		$lang['shop_1'] = "";
		if ($uid) {
			$lang['uid'] = $_SESSION['uid'];
			$lang['usermail'] = $_SESSION['usermail'];
		}
		if($lang!=""){
			$this->load->view('v_mall',$lang);
		}else{
			$this->load->view('v_mall');
		}
		
	}
	
	private function shop(){
		$data['shop_1'] = "һ�ŵ� 1.5%-4%";
		$data['shop_2'] = "˹���ۿ� 13%";
		$data['shop_3'] = "��Ь�� 4%-23%";
		$data['shop_4'] = "���ͳ�Ʒ 15%";
		$data['shop_5'] = "PBA��ױ�̳� 24%";
		$data['shop_6'] = "��Ь�� 10%";
		$data['shop_7'] = "������ 3%-10%";
		$data['shop_8'] = "���ڵ��� 4%";
		$data['shop_9'] = "NALA�̳� 11.5%";
		$data['shop_10'] = "��ݮ�ɻ���Ʒ�̳� 8%";
		$data['shop_11'] = "��һ|Ʒ 3%-12%";
		$data['shop_12'] = "����������� 0.3%-2%";
		$data['shop_13'] = "��͹����� 0.75%";
		$data['shop_14'] = "��̩�� 4%-11%";
		$data['shop_15'] = "���� 3.5%-12%";
	}
	
	public function go_to($shop=''){
		$ulr = '';
		switch($shop){
			case '1':
				$url = $this->one();
				break;
			case '2':
				$url = $this->two();
				break;
			case '3':
				$url = $this->three();
				break;
			case '4':
				$url = $this->four();
				break;
			case '5':
				$url = $this->five();
				break;
			case '6':
				$url = $this->six();
				break;
			case '7':
				$url = $this->seven();
				break;
			case '8':
				$url = $this->eight();
				break;
			case '9':
				$url = $this->nine();
				break;
			case '10':
				$url = $this->ten();
				break;
			case '11':
				$url = $this->eleven();
				break;
			case '12':
				$url = $this->twelve();
				break;
			case '13':
				$url = $this->thirteen();
				break;
			case '14':
				$url = $this->fourteen();
				break;
			case '15':
				$url = $this->fifteen();
				break;
			default:
				$url = '';
				break;
		}
		if(empty($url)){
			$url = site_url();
		}
		else{
			if($_SESSION['uid']>0){
				$url = $url.'&unid='.$_SESSION['uid'];
			}
		}
		header('Location:'.$url);
	}
	
	private function one(){
		//һ�ŵ�
		//ƽ��1.5-4
		$url = "http://s.click.taobao.com/t_11?e=%2BtSC5ziSlHPn2KeJMhhJbsldWfV6oeO4H5ymIt%2FCkol6sjcJDrF11IBQVx%2B2TRc%3D&p=mm_17750613_3303167_10765904";
		return $url;
	}
	
	private function two(){
		//˹���ۿ�
		//ƽ��13
		$url = "http://s.click.taobao.com/t_11?e=%2BtSC5ziSlQIE1Ja8%2FZFzpcVFjBcwFCnRSF3bUtUCYE5lSotUc8bZiEKgDGVLgIk4&p=mm_17750613_3303167_10765915";
		return $url;
	}
	
	private function three(){
		//��Ь��
		//4-23
		$url = "http://s.click.taobao.com/t_11?e=%2BtSC5ziSlHPh5IRqu2tnFzbOh3t70VPrOX0Q2fqB0S7UJ7xsmiXizofWXgd68dI%3D&p=mm_17750613_3303167_10765926";
		return $url;
	}
	
	private function four(){
		//���ͳ�Ʒ
		//15
		$url = "http://s.click.taobao.com/t_11?e=%2BtSC5ziSlQIKXTum23VHLUx2Mi9BvFxTCg7CN9kKD8HJdox0eUoImgi5Ng%3D%3D&p=mm_17750613_3303167_10765932";
		return $url;
	}
	
	private function five(){
		//PBA�̳�
		//24
		$url = "http://s.click.taobao.com/t_11?e=%2BtSC5ziSlQIKWwZv%2FOdFHL%2BK04IsHFTIXCbVQxdwNJs1TNXDFNfC0g%3D%3D&p=mm_17750613_3303167_10765941";
		return $url;
	}
	
	private function six(){
		//��Ь��
		//10
		$url = "http://s.click.taobao.com/t_11?e=%2BtSC5ziSlHPn35CjbVjP9fcQ3xmkT%2Bz8m4O64SnBAXuWbknAEyySLNM%3D&p=mm_17750613_3303167_10765949";
		return $url;
	}
	
	private function seven(){
		//������
		//3-10
		$url = "http://s.click.taobao.com/t_11?e=%2BtSC5ziSlQIL9v%2BrE3RpgrBKMY5c5LFv04hp4sSIQ5%2FFbanU9DE3sTwl9Q%3D%3D&p=mm_17750613_3303167_10765958";
		return $url;
	}
	
	private function eight(){
		//���ڵ���
		//4
		$url = "http://s.click.taobao.com/t_11?e=%2BtSC5ziSlHPh7%2B%2B5vtJZdsamXHl6xvs0XQZTxeVpZqQjNrTBd%2Fl1h7y7zNo%3D&p=mm_17750613_3303167_10765973";
		return $url;
	}
	
	private function nine(){
		//nala�̳�
		//11.5
		$url = "http://s.click.taobao.com/t_11?e=%2BtSC5ziSlQIE1xt%2BRglAo8sjIyt9m1kh%2BwgjguNIaWECnwUtKW48e%2BB535Bj&p=mm_17750613_3303167_10765989";
		return $url;
	}
	
	private function ten(){
		//��ݮ��
		//8
		$url = "http://s.click.taobao.com/t_11?e=%2BtSC5ziSlQIL9J8RFf1vAAmbQ4QP%2By7JOBefw1i9bpkauPycSEDk9BAQSNEFhvg%3D&p=mm_17750613_3303167_10765992";
		return $url;
	}
	
	private function eleven(){
		//��һ|Ʒ
		//3-12
		$url = "http://s.click.taobao.com/t_11?e=%2BtSC5ziSlQIE2%2Bhy9ehJgzmHfgbMU%2BTzERDooBKIvYZqQQO%2B8c1vm9c%3D&p=mm_17750613_3303167_10766002";
		return $url;
	}
	
	private function twelve(){
		//���������
		//0.3-2
		$url = "http://s.click.taobao.com/t_11?e=%2BtSC5ziSlHPkjIAWn%2FC5CCVPpLTo%2FGGvavp%2FvbIurBI3hFXpCRiJAi7Y3%2FTl&p=mm_17750613_3303167_10766016";
		return $url;
	}
	
	private function thirteen(){
		//�����
		//0.75
		$url = "http://s.click.taobao.com/t_11?e=%2BtSC5ziSlQIL8RMJ9xxFGJU4nnKDz4RcF28xF3%2BFriUzkoMHR4gQbNgd&p=mm_17750613_3303167_10766025";
		return $url;
	}
	
	private function fourteen(){
		//��̩��
		//4-11
		$url = "http://s.click.taobao.com/t_11?e=%2BtSC5ziSlQIFtEiJFzEZDed0a0spoMoFZUpqf9yL%2BhE59wK%2FBNnlwA49wvY%3D&p=mm_17750613_3303167_10766038";
		return $url;
	}
	
	private function fifteen(){
		//����
		$url = "";
	}
}